/**
 * @author [siwi]
 * @email [siwi@siwi.me]
 * @create date 2017-11-05 08:24:46
 * @modify date 2017-11-05 08:24:46
 * @desc [系统常量定义]
*/

let constant = {}

/** access_token_expire_at ACCESS_TOKEN 有效期默认7天 时间 秒**/ 
constant.ACCESS_TOKEN_EXPIRE_AT = () => {
    return Math.floor(Date.now() /  1000) + 86400*7
}

/** access_token_expire_at 默认7天 时间 秒 **/ 
constant.REFRESH_TOKEN_EXPIRE_AT = () => {
    return Math.floor(Date.now() / 1000)+ 86400*8
}

/** access_token_expire_at  默认1小时 时间 秒 **/ 
constant.OAUTH_CODE_EXPIRE_AT = () => {
    return Math.floor(Date.now() / 1000) + 3600
}

/** jwt sign_code 秘钥  **/
constant.SIGN_CODE = () => {
    return 'siwi2017@siwi2017.abc'
}

/** 系统运行端口  **/
constant.APP_RUNNING_PORT = () => {
    return 3000
}

/** md5加密 秘钥  **/
constant.SIGN_CODE = () => {
    return 'siwi2017@siwi2017.abc'
}

/** md5加密 秘钥  **/
constant.MD5_SECRET = () => {
    return 'siwi2017@siwi2017.abc'
}

/** SHA1加密 秘钥  **/
constant.SHA_SECRET = () => {
    return 'siwi2017@siwi2017.abc'
}

/** CIPHER加密 key  **/
constant.CIPHER_SECRET = () => {
    return 'siwi2017@siwi2017.abc'
}
/** DECIPHER_SECRET 解密 秘钥  **/
constant.DECIPHER_SECRET = () => {
    return 'siwi2017@siwi2017.abc'
}
module.exports = constant